<script setup>
import Loading from './components/Loading.vue';
import PageLoader from './components/PageLoader.vue';
import ExclusiveOffer from './layouts/ExclusiveOffer.vue';
import RightOff from './layouts/RightOff.vue';
import CookieConsent from './layouts/CookieConsent.vue';
import { onMounted } from 'vue'
import kefuAffix from '@/components/kefu/affix'

onMounted(() => {
    kefuAffix() // Code from module 'kefu'(avo)
})
</script>

<template>
  <a-config-provider
    :theme="{
      token: {
        colorPrimary: '#262626',
        colorPrimaryHover: '#434343',
        colorPrimaryActive: '#1f1f1f',
      }
    }"
  >
    <Loading></Loading>
    <router-view></router-view>
    <PageLoader />
  </a-config-provider>
  <!-- 兑换优惠卷弹框 -->
  <RightOff></RightOff>
  <!-- 右下角独家优惠 -->
  <ExclusiveOffer></ExclusiveOffer>
  <!-- Cookie同意提示 -->
  <CookieConsent></CookieConsent>
</template>

<style scoped>
header {
  line-height: 1.5;
}

.logo {
  display: block;
  margin: 0 auto 2rem;
}

@media (min-width: 1024px) {
  header {
    display: flex;
    place-items: center;
    padding-right: calc(var(--section-gap) / 2);
  }

  .logo {
    margin: 0 2rem 0 0;
  }

  header .wrapper {
    display: flex;
    place-items: flex-start;
    flex-wrap: wrap;
  }
}
</style>
